package com.hospital.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;


//预约挂号表
@Data
public class Order {
    @NotNull(message = "Order_id不得为空")
    private int Order_id;

    @NotNull(message = "patient_id不得为空")
    private int patient_id;

    @NotNull(message = "employee_id不得为空")
    private int employee_id;

    @NotNull(message = "office_id不得为空")
    private int office_id;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "order_time不得为空")
    private Date order_time;

    @JsonFormat(pattern = "yyyy-MM-dd-hh-mm-ss")
    @NotNull(message = "就诊时间不得为空")
    private Date treatment_time;

    @NotNull(message = "预约类型不得为空")
    private int order_type;

    @NotNull(message = "预约挂号金额不得为空")
    private double order_price;

}
